function* foo(num) {
  const value1 = 100 * num;
  console.log("第一段代码：", value1);
  const n = yield value1;

  const value2 = 200 * n;
  console.log("第二段代码：", value2);
  const count = yield value2;

  const value3 = 300 * count;
  console.log("第三段代码：", value3);
  yield value3;
}

const generator = foo(10);

generator.next();

// 第二段代码的执行
console.log(generator.return(25));
